const {Renderer, Figure2D, Mesh2D} = meshjs;

const canvas = document.querySelector('canvas')
const renderer = new Renderer(canvas);

const figure = new Figure2D;
figure.beginPath();
figure.moveTo(250, 0);
figure.lineTo(500, 500);
figure.lineTo(0, 500);

const mesh = new Mesh2D(figure, canvas);
mesh.setFill({
    color: [1, 0, 0, 1]
});

renderer.drawMeshes([mesh]);
